function FakeUI()
{
    var views = [];
    var game = new Game(69, ["Player 1", "Player 2"], new HierarkiaInfo(9, 9, 6));
    var fsm = new StateMachine();
    
    this.addView = function (view) { views.push(view); }
    
    this.updateCurrentGameViews = function()
    {
        for(var i in views)
            views[i].updateCurrentGame(game.currentPlayer(), game, fsm);
    }
    
    this.cellClicked = function(x ,y)
    {
        if(fsm.changeState(game, game.currentPlayer(), x, y))
        {

            if(fsm.state == UIState.MOVE || fsm.state == UIState.ATTACK)
            {
                var newhierarkia =
					(fsm.state == UIState.MOVE)
					? game.hierarkia().makeMove(fsm.from, fsm.to)
					: game.hierarkia().makeAttack(fsm.from, fsm.to);

                fsm.reset();
                game.addTurn(newhierarkia);
            }

            this.updateCurrentGameViews();
        }
    }

	this.pass = function()
	{
		fsm.reset();
		game.addTurn(game.hierarkia().pass());
        this.updateCurrentGameViews();
	}
}

